<?php 

namespace app\common\validate\department;

use think\Validate;

class Department extends Validate 
{ 
    protected $rule = [
        'department_name' => 'require',
        'code_no' => 'require',
    ];

    protected $message = [
        'department_name.require' => '请输入名称',
        'code_no.require' => '请输入部门编码',
    ];

    protected $scene = [
        'edit' => ['department_name','parent_id','order_num','admin_name','charge_name','charge_mobile','charge_email','code_no','id'],
        'add' => ['department_name','parent_id','order_num','admin_name','charge_name','charge_mobile','charge_email','code_no'],
    ];

} 
